package aad.storyboard.model;

import java.util.ArrayList;

import aad.storyboard.controller.DragDropManager;
import aad.storyboard.controller.GUIComposer;
import aad.storyboard.view.GraphicView;

public class DragHelper implements DragDropHelpCommand{
	private int X;
	private int Y;
	private GraphicView view;
	Image draggedImage;
	
	public DragHelper()
	{
		view=(GraphicView) GUIComposer.getInstance().getGraphicalView();
		
	}
	
	@Override
	public void help() {			
		draggedImage=view.getDraggedImage();
		if (draggedImage!=null)
		{draggedImage.setPosX(X-25);
		draggedImage.setPosY(Y-25);
		System.out.println("DragDrag"+X);
		}
    	
		DragDropManager.getInstance().invalidateDropZones(X, Y);
	}

	@Override
	public void setX(int x) {
		X=x;
		
	}

	@Override
	public void setY(int y) {
		Y=y;
		
	}
	

}
